<template>
  <div class="bannen">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="#f60" v-for="good in good" :key="good.id">
      <van-swipe-item><img :src="good.img" /></van-swipe-item>
      <van-swipe-item><img :src="good.imgs" /></van-swipe-item>
      <van-swipe-item><img :src="good.img" /></van-swipe-item>
      <van-swipe-item><img :src="good.imgs" /></van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import service from "../../../../api/apiserver"
export default {
  data() {
    return {
      good: {},
      arr:{}
    };
  },
  created() {
    // console.log("created", this.$route.params.id);
  service("/xiangqing").then((ok)=>{
   
    this.arr = ok.data
    // console.log(this.arr);
     this.good = this.arr.filter((v) => {
          if (v.id == this.$route.query.id) {
            return v;
          }

  })
  //  console.log(this.good);
  })
   
  },
};
</script>


<style scoped>
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
  width: 4.14rem;
  height: 4.14rem;
}
.my-swipe .van-swipe-item img {
  width: 100%;
  height: 100%;
}
.van-swipe__indicator {
  width: 0.09rem;
  height: 0.09rem;
  background-color: #9e9e9e;
  border-radius: 100%;
  opacity: 0.3;
  -webkit-transition: opacity 0.2s, background-color 0.2s;
  transition: opacity 0.2s, background-color 0.2s;
}
</style>